package com.robert.mvp.utils;

import android.annotation.SuppressLint;
import android.widget.Toast;

import com.robert.mvp.base.BaseApplication;

/**
 * Des:
 *
 * @Author: cpf
 * @date: ${date} ${hour} ${minute}
 * @email: 2227039052@qq.com
 */
public class ToastUtil {
    private static Toast toast;
    @SuppressLint("ShowToast")
    public static void showToast(String text) {
        if (toast == null) {
            toast = Toast.makeText(BaseApplication.getInstance(), text, Toast.LENGTH_SHORT);
        } else {
            toast.setText(text);
        }
        toast.show();
    }
}
